package com.tuanzi.loan.business.service.system;

import java.util.List;
import java.util.Map;

import org.springframework.data.domain.Page;

import com.tuanzi.loan.business.entity.system.Dictionary;
import com.tuanzi.loan.core.service.BaseService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.system.DictionarySearchRequest;
import com.tuanzi.loan.vo.response.system.DictionarySearchResponse;

/**
 * @author Ray 2017/09/21
 */
public interface DictionaryService extends BaseService<Dictionary, String> {

	List<Dictionary> findAllByCode(String code);

	Map<String, List<Dictionary>> batchFindByCodes(List<String> codes);

	Dictionary findByCodeAndName(String code, String name);

	Dictionary findByCode(String code);

	Map<String, String> listMapByCode(String code);

	void onRefreshCache();

	String findValueByCodeAndName(String code, String name);

	Page<DictionarySearchResponse> list(PageSearcher<DictionarySearchRequest> pageSearcher);
	
	Dictionary findByCodeAndValue1(String code, String value1);
}
